package code

import (
	"fmt"
	"time"
)

// 泛型是1.18 版本新增的功能
func Concurrence3() {
	for i := 0; i < 10; i++ {
		go hello(i)
	}
	fmt.Println("main goroutines done!")
	time.Sleep(time.Second * 2)
}

func hello(i int) {
	fmt.Println("Hello Goroutine: i", i)
}
